
#include "HomeScreenClass.h"
#include "PanelMenuBase.h"
#include "serlcd.h"
#include "PellTargetClass.h"
#include "PellClass.h"
#include "SoftwareSerial.h"
#include "constants.cpp"
#include "Bounce2.h";
#include "ControlPanelClass.h"
int  startupMils = 0;
Bounce bouncer = Bounce();

void setup()
{
	Serial.begin(9600);
	pinMode( btnlft ,INPUT_PULLUP);
	ControlPanel.LeftButton.attach(btnlft);

	pinMode( btnrt ,INPUT_PULLUP); //24
	ControlPanel.RightButton.attach(btnrt);

	pinMode( btnup ,INPUT_PULLUP);
	ControlPanel.UpButton.attach(btnup);

	pinMode( btndwn ,INPUT_PULLUP);
	ControlPanel.DownButton.attach(btndwn);

	pinMode( btnmnu ,INPUT_PULLUP);
	ControlPanel.MenuButton.attach(btnmnu);

	pinMode( btnent ,INPUT_PULLUP); 
	ControlPanel.EnterButton.attach(btnent);

  /*Initialize the Pell */
  Pell.setup();

	startupMils = millis();	
	
}



void loop()
{
	// Allows the screen to initialize
	if( millis() < startupMils + 2000){
		return;
	}
	Pell.Update();
	

}

void lcdReset(){               //New Function
  Serial.print(0xFE, BYTE);  //Command code
  Serial.print(0x72, BYTE);  //Reset code
}

void cls(){                       //New Function
  Serial.print(0xFE, BYTE);  //Command Code
  Serial.print(0x01, BYTE);  //Clear Screen Code
}